# -*- coding: utf-8 -*-
"""
-------------------------------------------------
Project Name: luffcity study project
File Name: 内置函数.py
Author: kij
Create Date: 2021/2/10
-------------------------------------------------
"""
cpu_dict = {"Intel Xeon Platinum 8176 @ 2.10GHz": 30583,
			"Intel Xeon Platinum 8173M @ 2.00GHz": 28860,
			"Intel Core i9-9980XE @ 3.00GHz": 29718,
			"Intel Xeon Platinum 8168 @ 2.70GHz": 29131,
			"Intel Core i9-7980XE @ 2.60GHz": 27830,
			"Intel Xeon Gold 6154 @ 3.00GHz": 27722,
			"Intel Xeon Platinum 8175M @ 2.50GHz": 28103,
			"Intel Core i9-9940X @ 3.30GHz": 27350,
			"Intel Xeon Platinum 8124M @ 3.00GHz": 26835,
			"Intel Core i9-7960X @ 2.80GHz": 25998,
			"Intel Xeon Gold 6138 @ 2.00GHz": 25774,
			"Intel Core i9-9960X @ 3.10GHz": 27881, }

# 递归实现二分法
# 现排序
new_cpu_key = sorted(cpu_dict,key=lambda cpu_key : cpu_dict[cpu_key])
# new_cpu_list = [lambda num for num in new_cpu_dict.value]
print(type(new_cpu_key))
new_cpu_list = [cpu_dict[new_cpu_key[i]] for i in range(0,len(cpu_dict))]
print(new_cpu_list)